import React, { Component } from 'react'
import { Routes,Route,NavLink,Navigate, Outlet} from 'react-router-dom'
import Message from './Message'
import News from './News'
// import Test from '../Test'

export default class Home extends Component {
  render() {
    return (
      <div>
        <h3>我是Home的内容</h3>
        <div>
            <ul className="nav nav-tabs">
              <li>
                <NavLink className="list-group-item" to="news">News</NavLink>
              </li>
              <li>
                <NavLink className="list-group-item" to="message">Message</NavLink>
              </li>
            </ul>
            <Outlet/>
          <div>
            {/* <Routes>
              <Route path="/home/message" element={<Message/>}/>
              <Route path="/home/news" element={<News/>}/>
              <Route path="/home" element={<Navigate to="news"/>}/>
            </Routes>           */}
            {/* <News/> */}
          </div>
        </div>
      </div>
    )
  }
}
